remove encoding, fixed encoding data from formats. (#973)
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Fri, 6 Jan 2023 13:32:51 +0000 (06:32 -0700)
committerGitHub <noreply@github.com>
Fri, 6 Jan 2023 13:32:51 +0000 (06:32 -0700)
46 files changed:
brauniger_iq.cc
defs.h
dg-100.h
exif.h
format.h
format_skeleton.cc
garmin.cc
garmin_fit.h
garmin_gpi.h
garmin_txt.cc
garmin_xt.cc
gdb.h
geo.cc
geojson.h
globalsat_sport.h
gpssim.cc
gpx.h
gtm.cc
gtrnctr.h
holux.cc
html.h
humminbird.h
igc.cc
kml.h
legacyformat.h
lowranceusr.h
mtk_logger.cc
navilink.cc
nmea.h
osm.h
ozi.cc
qstarz_bl_1000.h
random.h
sbn.cc
sbp.cc
shape.h
skytraq.h
subrip.h
text.h
tpg.cc
tpo.cc
unicsv.h
v900.cc
vcf.cc
wbt-200.cc
xcsv.h

index 7074caac2ddc835587d844126fbd5649521ea87f..371096779c6857ae4108e3c3eb6daef183c35f6e 100644 (file)
@@ -263,6 +263,8 @@ static void data_read()
 static QVector<arglist_t> brauniger_iq_args = {
 };
 
+/* master process: don't convert anything */
+
 ff_vecs_t brauniger_iq_vecs = {
   ff_type_serial,
   { ff_cap_none, ff_cap_read, ff_cap_none},
@@ -274,6 +276,5 @@ ff_vecs_t brauniger_iq_vecs = {
   nullptr,
   nullptr,
   &brauniger_iq_args,
-  CET_CHARSET_UTF8, 1          /* master process: don't convert anything | CET-REVIEW */
-  , NULL_POS_OPS
+  NULL_POS_OPS
 };
diff --git a/defs.h b/defs.h
index c56bb162d57aaac9eede1da6b2d634ab8a2fa6f2..feba72f4c49400876934d4997e0e9742e96a1be0 100644 (file)
--- a/defs.h
+++ b/defs.h
@@ -927,8 +927,6 @@ struct ff_vecs_t {
   ff_write write;
   ff_exit exit;
   QVector<arglist_t>* args;
-  QString encode;
-  int fixed_encode;
   position_ops_t position_ops;
 };
 
@@ -988,14 +986,6 @@ QString pretty_deg_format(double lat, double lon, char fmt, const char* sep, boo
 
 QString get_filename(const QString& fname);                    /* extract the filename portion */
 
-/*
- * Character encoding transformations.
- */
-
-#define CET_CHARSET_ASCII      "US-ASCII"
-#define CET_CHARSET_UTF8       "UTF-8"
-#define CET_CHARSET_MS_ANSI    "windows-1252"
-
 /* this lives in gpx.c */
 gpsbabel::DateTime xml_parse_time(const QString& dateTimeString);
 
index 7d471477dfefdce51c37e8a5354c770a0f8497c0..7e3b5f438a4a3cccf1e4e5c6cd807234840fa068 100644 (file)
--- a/dg-100.h
+++ b/dg-100.h
@@ -62,16 +62,6 @@ public:
     };
   }
 
-  QString get_encode() const override
-  {
-    return CET_CHARSET_ASCII;
-  }
-
-  int get_fixed_encode() const override
-  {
-    return 0;
-  }
-
   void read() override;
   void rd_deinit() override;
 
diff --git a/exif.h b/exif.h
index ee50de1deb8d9bb5eb2ea52a8a01f62a3bf4e359..86a83ed29afd6db5b31478c073f2bcd95cd91aaa 100644 (file)
--- a/exif.h
+++ b/exif.h
@@ -46,7 +46,7 @@
 
 #include <cstdint>    // for uint32_t, uint16_t, uint8_t, int16_t, int32_t
 
-#include "defs.h"     // for arglist_t, ff_cap, Waypoint, ARG_NOMINMAX, ARGTYPE_BOOL, ff_cap_none, ARGTYPE_INT, ARGTYPE_STRING, CET_CHARSET_UTF8, ff_cap_read, ff_cap_write, ff_type, ff_type_file
+#include "defs.h"     // for arglist_t, ff_cap, Waypoint, ARG_NOMINMAX, ARGTYPE_BOOL, ff_cap_none, ARGTYPE_INT, ARGTYPE_STRING, ff_cap_read, ff_cap_write, ff_type, ff_type_file
 #include "format.h"   // for Format
 #include "gbfile.h"   // for gbfile, gbsize_t
 
@@ -73,16 +73,6 @@ public:
     };
   }
 
-  QString get_encode() const override
-  {
-    return CET_CHARSET_UTF8;
-  }
-
-  int get_fixed_encode() const override
-  {
-    return 0;
-  }
-
   void rd_init(const QString& fname) override;
   void read() override;
   void rd_deinit() override;
index 229e0062003d56a6d74cca905f7fcc18bead087f..3774c59e84078e6d2ecc3260ff796906848490a4 100644 (file)
--- a/format.h
+++ b/format.h
@@ -168,8 +168,6 @@ public:
 
   virtual ff_type get_type() const = 0;
   virtual QVector<ff_cap> get_cap() const = 0;
-  virtual QString get_encode() const = 0;
-  virtual int get_fixed_encode() const = 0;
 
   QString get_name() const
   {
index e84f36e5a99f11f93579b4ac1a5a3b998fff4525..07e33f9d667b893e971e5c2bf1e2bf378e104036 100644 (file)
@@ -148,10 +148,7 @@ ff_vecs_t format_skeleton_vecs = {
   format_skeleton_write,
   format_skeleton_exit,
   &format_skeleton_args,
-  CET_CHARSET_ASCII, 0,                        /* ascii is the expected character set */
-  /* not fixed, can be changed through command line parameter */
-  NULL_POS_OPS, // Unless you do realtime positioning
-  nullptr // name. Not used by modules.
+  NULL_POS_OPS // Unless you do realtime positioning
 
 };
 /**************************************************************************/
index 0b1ba3b8727d28caa18f0ebe7c4876252c46c399..cac9428b62d70a8ec643abe28cc06fd4efcef0dc 100644 (file)
--- a/garmin.cc
+++ b/garmin.cc
@@ -141,7 +141,7 @@ static void
 rw_init(const QString& fname)
 {
   receiver_must_upper = 1;
-  const char* receiver_charset = CET_CHARSET_ASCII;
+  const char* receiver_charset = "US-ASCII";
 
   if (!mkshort_handle) {
     mkshort_handle = mkshort_new_handle();
@@ -268,7 +268,7 @@ rw_init(const QString& fname)
       snwhiteopt = xstrdup("1");
       receiver_must_upper = 0;
       /* This might be 8859-1 */
-      receiver_charset = CET_CHARSET_MS_ANSI;
+      receiver_charset = "windows-1252";
       break;
     case 291: /* GPSMAP 60CS, probably others */
     case 1095: /* GPS 72H */
@@ -280,7 +280,7 @@ rw_init(const QString& fname)
     case 463: /* Quest 2 */
       receiver_must_upper = 0;
       receiver_short_length = 30;
-      receiver_charset = CET_CHARSET_MS_ANSI;
+      receiver_charset = "windows-1252";
       break;
     case 577: // Rino 530HCx Version 2.50
       receiver_must_upper = 0;
@@ -288,7 +288,7 @@ rw_init(const QString& fname)
       break;
     case 429: // Streetpilot i3
       receiver_must_upper = 0;
-      receiver_charset = CET_CHARSET_MS_ANSI;
+      receiver_charset = "windows-1252";
       receiver_short_length = 30;
       break;
     case 484: // Forerunner 305
@@ -1167,7 +1167,6 @@ ff_vecs_t garmin_vecs = {
   data_write,
   nullptr,
   &garmin_args,
-  CET_CHARSET_ASCII, 0,
   { pvt_init, pvt_read, rw_deinit, nullptr, nullptr, nullptr }
 };
 
index ed580f80b041573b902b5328f4f3336a50f1fa30..fc943ecfe46488ebeb09a3b146423eb73fd7215b 100644 (file)
@@ -64,16 +64,6 @@ public:
     };
   }
 
-  QString get_encode() const override
-  {
-    return CET_CHARSET_ASCII;
-  }
-
-  int get_fixed_encode() const override
-  {
-    return 0;
-  }
-
   void rd_init(const QString& fname) override;
   void read() override;
   void rd_deinit() override;
index a339d0e8b6fd1a868384d5c7ccc07b4aac88149c..d13920184b57679ed8fe163191d520832bdc2aec 100644 (file)
@@ -55,7 +55,7 @@
 #include <cstdint>      // for int32_t, int16_t, uint16_t
 #include <ctime>        // for time_t
 
-#include "defs.h"       // for arglist_t, ARG_NOMINMAX, ff_cap, Waypoint, ARGTYPE_BOOL, ARGTYPE_STRING, ff_cap_none, ARGTYPE_FILE, ARGTYPE_INT, CET_CHARSET_MS_ANSI, bounds, ff_cap_read, ff_cap_write, ff_type, ff_type_file, short_handle
+#include "defs.h"       // for arglist_t, ARG_NOMINMAX, ff_cap, Waypoint, ARGTYPE_BOOL, ARGTYPE_STRING, ff_cap_none, ARGTYPE_FILE, ARGTYPE_INT, bounds, ff_cap_read, ff_cap_write, ff_type, ff_type_file, short_handle
 #include "format.h"     // for Format
 #include "garmin_fs.h"  // for garmin_fs_t
 #include "gbfile.h"     // for gbfile
@@ -83,16 +83,6 @@ public:
     };
   }
 
-  QString get_encode() const override
-  {
-    return CET_CHARSET_MS_ANSI;    /* WIN-CP1252 */
-  }
-
-  int get_fixed_encode() const override
-  {
-    return 0;
-  }
-
   void rd_init(const QString& fname) override;
   void read() override;
   void rd_deinit() override;
index 1f102763c66c7b6fce477ddce9c586f3cc1b2374..e544a2907d0a452d613aa07bbb2889f46f6288fe 100644 (file)
@@ -745,7 +745,7 @@ garmin_txt_wr_init(const QString& fname)
   memset(&gtxt_flags, 0, sizeof(gtxt_flags));
 
   fout = new gpsbabel::TextStream;
-  fout->open(fname, QIODevice::WriteOnly, MYNAME, "Windows-1252");
+  fout->open(fname, QIODevice::WriteOnly, MYNAME, "windows-1252");
 
   gtxt_flags.metric = (toupper(*get_option_val(opt_dist, "m")) == 'M');
   gtxt_flags.celsius = (toupper(*get_option_val(opt_temp, "c")) == 'C');
@@ -1348,7 +1348,7 @@ garmin_txt_rd_init(const QString& fname)
   memset(&gtxt_flags, 0, sizeof(gtxt_flags));
 
   fin = new gpsbabel::TextStream;
-  fin->open(fname, QIODevice::ReadOnly, MYNAME, "Windows-1252");
+  fin->open(fname, QIODevice::ReadOnly, MYNAME, "windows-1252");
   memset(&header_ct, 0, sizeof(header_ct));
 
   datum_index = -1;
@@ -1415,6 +1415,14 @@ garmin_txt_read()
   }
 }
 
+/*
+ * The file encoding is windows-1252.
+ * Conversion between windows-1252 and utf-16 is handled by the stream.
+ * Conversion between utf-16 and utf-8 is handled by this format.
+ * Let main know char strings have already been converted to utf-8
+ * so it doesn't attempt to re-convert any char strings including gmsd data.
+ */
+
 ff_vecs_t garmin_txt_vecs = {
   ff_type_file,
   FF_CAP_RW_ALL,
@@ -1426,15 +1434,7 @@ ff_vecs_t garmin_txt_vecs = {
   garmin_txt_write,
   nullptr,
   &garmin_txt_args,
-  /*
-   * The file encoding is Windows-1252, a.k.a CET_CHARSET_MS_ANSI.
-   * Conversion between Windows-1252 and utf-16 is handled by the stream.
-   * Conversion between utf-16 and utf-8 is handled by this format.
-   * Let main know char strings have already been converted to utf-8
-   * so it doesn't attempt to re-convert any char strings including gmsd data.
-   */
-  CET_CHARSET_UTF8, 0
-  , NULL_POS_OPS
+  NULL_POS_OPS
 };
 
 #endif // CSVFMTS_ENABLED
index 6c179f74f8ba22eaf6ffa5442867ed1b38d20530..5e62af4dbf643eaa6c00dc629cdec6f63350da92 100644 (file)
@@ -406,6 +406,9 @@ format_garmin_xt_read()
 
 /**************************************************************************/
 
+/* ascii is the expected character set */
+/* not fixed, can be changed through command line parameter */
+
 ff_vecs_t format_garmin_xt_vecs = {
   ff_type_file,
   {
@@ -421,8 +424,6 @@ ff_vecs_t format_garmin_xt_vecs = {
   nullptr,
   nullptr,
   &format_garmin_xt_args,
-  CET_CHARSET_ASCII, 0                 /* ascii is the expected character set */
-  /* not fixed, can be changed through command line parameter */
-  , NULL_POS_OPS
+  NULL_POS_OPS
 };
 /**************************************************************************/
diff --git a/gdb.h b/gdb.h
index 5a30783b896ff6eb43dbf8405c8dbdea4e33cf06..f8691230e267005a0c84260577597a4475b28399 100644 (file)
--- a/gdb.h
+++ b/gdb.h
@@ -30,7 +30,7 @@
 #include <QString>          // for QString
 #include <QVector>          // for QVector
 
-#include "defs.h"           // for arglist_t, Waypoint, route_head, ARGTYPE_BOOL, ARGTYPE_INT, ARG_NOMINMAX, bounds, CET_CHARSET_MS_ANSI, FF_CAP_RW_ALL, ff_cap, ff_type, ff_type_file, short_handle
+#include "defs.h"           // for arglist_t, Waypoint, route_head, ARGTYPE_BOOL, ARGTYPE_INT, ARG_NOMINMAX, bounds, FF_CAP_RW_ALL, ff_cap, ff_type, ff_type_file, short_handle
 #include "format.h"         // for Format
 #include "garmin_fs.h"      // for garmin_fs_t
 #include "garmin_tables.h"  // for gt_waypt_classes_e
@@ -55,17 +55,6 @@ public:
     return FF_CAP_RW_ALL;
   }
 
-  QString get_encode() const override
-  {
-    return CET_CHARSET_MS_ANSI;
-  }
-
-  int get_fixed_encode() const override
-  {
-    /* O.K.: changed to NON-FIXED because of utf8 strings since GDB V3 */
-    return 0;
-  }
-
   void rd_init(const QString& fname) override;
   void read() override;
   void rd_deinit() override;
diff --git a/geo.cc b/geo.cc
index cc435e3cb8e8be6ead16e4b12db141f630270fab..4144cf036f3d1be0d1287b743f850333929b7a43 100644 (file)
--- a/geo.cc
+++ b/geo.cc
@@ -276,6 +276,5 @@ ff_vecs_t geo_vecs = {
   geo_write,
   nullptr,
   &geo_args,
-  CET_CHARSET_UTF8, 0, /* CET-REVIEW */
   NULL_POS_OPS
 };
index ec2439595451931936fa76e8321bcbc0da6903fd..bcb9b20a7f66671c1e78b47bc6608b437453c76b 100644 (file)
--- a/geojson.h
+++ b/geojson.h
@@ -48,16 +48,6 @@ public:
     return FF_CAP_RW_ALL;
   }
 
-  QString get_encode() const override
-  {
-    return CET_CHARSET_UTF8;
-  }
-
-  int get_fixed_encode() const override
-  {
-    return 0;
-  }
-
   void rd_init(const QString& fname) override;
   void read() override;
   void rd_deinit() override;
index 9200bbe25fd035358af4bf4b69e5189020c7f516..6a2586f36f61b96368c6e1d1a4d6318874425a06 100644 (file)
@@ -70,16 +70,6 @@ public:
     };
   }
 
-  QString get_encode() const override
-  {
-    return CET_CHARSET_ASCII;
-  }
-
-  int get_fixed_encode() const override
-  {
-    return 0;
-  }
-
   void rd_init(const QString& fname) override;
   void read() override;
   void rd_deinit() override;
index a599a8ff6cdd4bb0d83b5d04f4060653d2e08572..86865f442a43b673ab9848d7a2c5c43f56749555 100644 (file)
--- a/gpssim.cc
+++ b/gpssim.cc
@@ -197,6 +197,5 @@ ff_vecs_t gpssim_vecs = {
   gpssim_write,
   nullptr,
   &gpssim_args,
-  CET_CHARSET_ASCII, 0
-  , NULL_POS_OPS
+  NULL_POS_OPS
 };
diff --git a/gpx.h b/gpx.h
index 98bcf872985b474cf6b63ba504094ef153584e94..7248758f8c360d9b264f7c2b9fb8f2db9cd7ad45 100644 (file)
--- a/gpx.h
+++ b/gpx.h
@@ -57,16 +57,6 @@ public:
     return FF_CAP_RW_ALL;
   }
 
-  QString get_encode() const override
-  {
-    return CET_CHARSET_UTF8;
-  }
-
-  int get_fixed_encode() const override
-  {
-    return 0;
-  }
-
   void rd_init(const QString& fname) override;
   void read() override;
   void rd_deinit() override;
diff --git a/gtm.cc b/gtm.cc
index 2a0a71c33d43a924b7e172148e22cea60d31231e..9460737d9b0c15009c2269c85b276f34a49b4b5d 100644 (file)
--- a/gtm.cc
+++ b/gtm.cc
@@ -737,6 +737,5 @@ ff_vecs_t gtm_vecs = {
   gtm_write,
   nullptr,
   &gtm_args,
-  CET_CHARSET_ASCII, 0, /* CET-REVIEW */
   NULL_POS_OPS
 };
index 1971e7a044bfb8e7886b177d5bb376b85b1a0e63..8556f1c500b56492a4323e07fb3c073b8203170b 100644 (file)
--- a/gtrnctr.h
+++ b/gtrnctr.h
@@ -31,7 +31,7 @@
 #include <QVector>               // for QVector
 #include <QXmlStreamAttributes>  // for QXmlStreamAttributes
 
-#include "defs.h"                // for arglist_t, ff_cap, route_head, Waypoint, computed_trkdata, ARG_NOMINMAX, ff_cap_read, ARGTYPE_BOOL, ARGTYPE_STRING, CET_CHARSET_ASCII, ff_cap_none, ff_cap_write, ff_type, ff_type_file
+#include "defs.h"                // for arglist_t, ff_cap, route_head, Waypoint, computed_trkdata, ARG_NOMINMAX, ff_cap_read, ARGTYPE_BOOL, ARGTYPE_STRING, ff_cap_none, ff_cap_write, ff_type, ff_type_file
 #include "format.h"              // for Format
 #include "gbfile.h"              // for gbfile
 #include "src/core/datetime.h"   // for DateTime
@@ -60,16 +60,6 @@ public:
     };
   }
 
-  QString get_encode() const override
-  {
-    return CET_CHARSET_ASCII;
-  }
-
-  int get_fixed_encode() const override
-  {
-    return 0;
-  }
-
   void rd_init(const QString& fname) override;
   void read() override;
   void rd_deinit() override;
index b72b5c0bf2a75796102e074a7f952608c93506e9..3a202f35f594341791cd389b6ca0adc78936e94a 100644 (file)
--- a/holux.cc
+++ b/holux.cc
@@ -306,6 +306,5 @@ ff_vecs_t holux_vecs = {
   data_write,
   nullptr,
   nullptr,
-  CET_CHARSET_ASCII, 0 /* CET-REVIEW */
-  , NULL_POS_OPS
+  NULL_POS_OPS
 };
diff --git a/html.h b/html.h
index 86e16ada42932a689b612f0babbc044369324b20..87ba8c0a936ec33fd985f9a042094938bd95f176 100644 (file)
--- a/html.h
+++ b/html.h
@@ -48,16 +48,6 @@ public:
     return { ff_cap_write, ff_cap_none, ff_cap_none };
   }
 
-  QString get_encode() const override
-  {
-    return CET_CHARSET_UTF8;
-  }
-
-  int get_fixed_encode() const override
-  {
-    return 0;
-  }
-
   void wr_init(const QString& fname) override;
   void write() override;
   void wr_deinit() override;
index 00b59da7f3c86b7e577d1e9fa7ff68a38b81ba98..9e7a43bdcd9e4663397e0d3f1b81991a4f43938f 100644 (file)
@@ -27,7 +27,7 @@
 
 #include <cstdint>   // for int32_t, uint32_t
 
-#include "defs.h"    // for ff_cap, arglist_t, ff_cap_read, Waypoint, route_head, ff_cap_write, short_handle, CET_CHARSET_ASCII, ff_type, ff_type_file
+#include "defs.h"    // for ff_cap, arglist_t, ff_cap_read, Waypoint, route_head, ff_cap_write, short_handle, ff_type, ff_type_file
 #include "format.h"  // for Format
 #include "gbfile.h"  // for gbfile
 
@@ -136,16 +136,6 @@ public:
     };
   }
 
-  QString get_encode() const override
-  {
-    return CET_CHARSET_ASCII;
-  }
-
-  int get_fixed_encode() const override
-  {
-    return 1;
-  }
-
   void rd_init(const QString& fname) override {humminbird_rd_init(fname);}
   void read() override {humminbird_read();}
   void rd_deinit() override {humminbird_rd_deinit();}
@@ -190,16 +180,6 @@ public:
     };
   }
 
-  QString get_encode() const override
-  {
-    return CET_CHARSET_ASCII;
-  }
-
-  int get_fixed_encode() const override
-  {
-    return 1;
-  }
-
   void rd_init(const QString& fname) override {humminbird_rd_init(fname);}
   void read() override {humminbird_read();}
   void rd_deinit() override {humminbird_rd_deinit();}
diff --git a/igc.cc b/igc.cc
index 44a187405761f8ef43bb9920185ed4db126497e4..b9e3e006e2084931af3a3297368bb11ddaf56487 100644 (file)
--- a/igc.cc
+++ b/igc.cc
@@ -940,6 +940,5 @@ ff_vecs_t igc_vecs = {
   data_write,
   nullptr,
   &igc_args,
-  CET_CHARSET_ASCII, 0 /* CET-REVIEW */
-  , NULL_POS_OPS
+  NULL_POS_OPS
 };
diff --git a/kml.h b/kml.h
index 4d9b922967daec209c255d8e69c80f95f6ff0ba7..3eec80157060b13d6f2f88b84299be79fcab1746 100644 (file)
--- a/kml.h
+++ b/kml.h
@@ -56,16 +56,6 @@ public:
     return FF_CAP_RW_ALL;
   }
 
-  QString get_encode() const override
-  {
-    return CET_CHARSET_UTF8;
-  }
-
-  int get_fixed_encode() const override
-  {
-    return 1;
-  }
-
   void rd_init(const QString& fname) override;
   void read() override;
   void rd_deinit() override;
index f0c752730036cac9fd59a0b0d9775221efbb7866..2ce92594c1da7347f729c2b334272d1167d03e31 100644 (file)
@@ -146,15 +146,6 @@ public:
   {
     return vec.cap;
   }
-  QString get_encode() const override
-  {
-    return vec.encode;
-  }
-
-  int get_fixed_encode() const override
-  {
-    return vec.fixed_encode;
-  }
 
 private:
   ff_vecs_t vec;
index c42bc3b88df454bc04571bded66a3004b3529804..605c12bd505760c2c318ee5e5ea9449a2f27e1b3 100644 (file)
@@ -124,16 +124,6 @@ public:
     return FF_CAP_RW_ALL;
   }
 
-  QString get_encode() const override
-  {
-    return CET_CHARSET_ASCII;
-  }
-
-  int get_fixed_encode() const override
-  {
-    return 0;
-  }
-
   void rd_init(const QString& fname) override;
   void read() override;
   void rd_deinit() override;
index fdb014782c8cbd83909f0a3fbba59908e66bf2c0..d94b47854ac259027229e952f9a0d39d64c282ee 100644 (file)
@@ -1655,6 +1655,9 @@ static void file_read()
 // GPS logger will only handle tracks - neither waypoints or tracks...
 // Actually, some of the Holux devices will read waypoints.
 
+/* ascii is the expected character set */
+/* not fixed, can be changed through command line parameter */
+
 ff_vecs_t mtk_vecs = {
   ff_type_serial,
   {
@@ -1670,11 +1673,12 @@ ff_vecs_t mtk_vecs = {
   nullptr,
   nullptr,
   &mtk_sargs,
-  CET_CHARSET_ASCII, 0                 /* ascii is the expected character set */
-  /* not fixed, can be changed through command line parameter */
-  , NULL_POS_OPS
+  NULL_POS_OPS
 };
 
+/* ascii is the expected character set */
+/* not fixed, can be changed through command line parameter */
+
 ff_vecs_t mtk_m241_vecs = {
   ff_type_serial,
   {
@@ -1690,9 +1694,7 @@ ff_vecs_t mtk_m241_vecs = {
   nullptr,
   nullptr,
   &mtk_sargs,
-  CET_CHARSET_ASCII, 0                 /* ascii is the expected character set */
-  /* not fixed, can be changed through command line parameter */
-  , NULL_POS_OPS
+  NULL_POS_OPS
 };
 
 /* used for mtk-bin */
@@ -1704,6 +1706,8 @@ static QVector<arglist_t> mtk_fargs = {
   },
 };
 
+/* master process: don't convert anything */
+
 ff_vecs_t mtk_fvecs = {
   ff_type_file,
   { ff_cap_read, ff_cap_read, ff_cap_none },
@@ -1715,10 +1719,11 @@ ff_vecs_t mtk_fvecs = {
   nullptr,
   nullptr,
   &mtk_fargs,
-  CET_CHARSET_UTF8, 1         /* master process: don't convert anything | CET-REVIEW */
-  , NULL_POS_OPS
+  NULL_POS_OPS
 };
 
+/* master process: don't convert anything */
+
 ff_vecs_t mtk_m241_fvecs = {
   ff_type_file,
   { ff_cap_read, ff_cap_read, ff_cap_none },
@@ -1730,8 +1735,7 @@ ff_vecs_t mtk_m241_fvecs = {
   nullptr,
   nullptr,
   &mtk_fargs,
-  CET_CHARSET_UTF8, 1         /* master process: don't convert anything | CET-REVIEW */
-  , NULL_POS_OPS
+  NULL_POS_OPS
 };
 /* End file: mtk_logger.c */
 /**************************************************************************/
index 4ddf6189cd6dad4e24d0e18b67215e478b01bf88..49e61f92080b0a2f86d8ba4e6bc5bca978b9c5a6 100644 (file)
@@ -1223,6 +1223,5 @@ ff_vecs_t navilink_vecs = {
   navilink_write,
   nullptr,
   &navilink_args,
-  CET_CHARSET_ASCII, 0 /* CET-REVIEW */
-  , NULL_POS_OPS
+  NULL_POS_OPS
 };
diff --git a/nmea.h b/nmea.h
index e0f3a679d9b1b03f7a9a28f42fece4ee0129a0c8..d612abdbb1f3993a2262ff9f0e4492e87388fa77 100644 (file)
--- a/nmea.h
+++ b/nmea.h
@@ -59,16 +59,6 @@ public:
     };
   }
 
-  QString get_encode() const override
-  {
-    return CET_CHARSET_ASCII;
-  }
-
-  int get_fixed_encode() const override
-  {
-    return 0;
-  }
-
   void rd_init(const QString& fname) override;
   void read() override;
   void rd_deinit() override;
diff --git a/osm.h b/osm.h
index 5e4f5bafe5800f727f848e3916f628214ea5c90d..87590b45bd9bfef8194fed9c245552be593a87fe 100644 (file)
--- a/osm.h
+++ b/osm.h
@@ -60,16 +60,6 @@ public:
     };
   }
 
-  QString get_encode() const override
-  {
-    return CET_CHARSET_UTF8;
-  }
-
-  int get_fixed_encode() const override
-  {
-    return 0;
-  }
-
   void rd_init(const QString& fname) override;
   void read() override;
   void rd_deinit() override;
diff --git a/ozi.cc b/ozi.cc
index 3bb429898168ee5b89a8d727ce2dd5d2a616eaff..c6d01622dc5ad8d94b88d1a2033454c523327893 100644 (file)
--- a/ozi.cc
+++ b/ozi.cc
@@ -970,6 +970,5 @@ ff_vecs_t ozi_vecs = {
   data_write,
   nullptr,
   &ozi_args,
-  CET_CHARSET_ASCII, 0 /* CET-REVIEW */
-  , NULL_POS_OPS
+  NULL_POS_OPS
 };
index b251efb517a20c03343d817c1c5047b4b5407676..2870407e9bea469ef1b0f8de10360599819eeac8 100644 (file)
@@ -31,7 +31,7 @@
 #include <QVector>             // for QVector
 #include <QtGlobal>            // for qint8, quint16, quint8
 
-#include "defs.h"              // for ff_cap, ff_cap_read, ff_cap_none, CET_CHARSET_ASCII, ff_type, ff_type_file, route_head
+#include "defs.h"              // for ff_cap, ff_cap_read, ff_cap_none, ff_type, ff_type_file, route_head
 #include "format.h"            // for Format
 #include "formspec.h"          // for FormatSpecificData, kFsQstarzBl1000
 
@@ -69,16 +69,6 @@ public:
     };
   }
 
-  QString get_encode() const override
-  {
-    return CET_CHARSET_ASCII;
-  }
-
-  int get_fixed_encode() const override
-  {
-    return 0;
-  }
-
   void rd_init(const QString& fname) override;
   void read() override;
   void rd_deinit() override;
index 53e5dd25d88e0b150d74117708f96a4ec4f2cc57..3f392e3bd86829bc80d2459b3584d0feb80cf74f 100644 (file)
--- a/random.h
+++ b/random.h
@@ -54,16 +54,6 @@ public:
     };
   }
 
-  QString get_encode() const override
-  {
-    return CET_CHARSET_ASCII;
-  }
-
-  int get_fixed_encode() const override
-  {
-    return 1;
-  }
-
   void rd_init(const QString& fname) override;
   void read() override;
   void rd_deinit() override;
diff --git a/sbn.cc b/sbn.cc
index 8d81b9f493946b6944554671022445a9c59fa20c..735f87a0783cd69403be6c6e705f6d0e252e2368 100644 (file)
--- a/sbn.cc
+++ b/sbn.cc
@@ -309,6 +309,10 @@ sbn_read()
 
 /**********************************************************************/
 
+/* Characters are always encoded in ASCII. Even if the unit is set
+ * to Chinese language, only ASCII characters can be entered.
+ */
+
 ff_vecs_t sbn_vecs = {
   ff_type_file,
   {
@@ -324,9 +328,6 @@ ff_vecs_t sbn_vecs = {
   nullptr,
   nullptr,
   &sbn_args,
-  /* Characters are always encoded in ASCII. Even if the unit is set
-   * to Chinese language, only ASCII characters can be entered. */
-  CET_CHARSET_ASCII, 0
-  , NULL_POS_OPS
+  NULL_POS_OPS
 };
 /**********************************************************************/
diff --git a/sbp.cc b/sbp.cc
index 6f9ccd24b4acf42847d5f013c33080ad73f7bcee..e9907132c7764e5022dfed1ca44ffe0fb7a09bc1 100644 (file)
--- a/sbp.cc
+++ b/sbp.cc
@@ -117,6 +117,9 @@ sbp_read()
 
 /**************************************************************************/
 
+/* ascii is the expected character set */
+/* not fixed, can be changed through command line parameter */
+
 ff_vecs_t sbp_vecs = {
   ff_type_file,
   {
@@ -132,8 +135,6 @@ ff_vecs_t sbp_vecs = {
   nullptr,
   nullptr,
   &sbp_args,
-  CET_CHARSET_ASCII, 0                 /* ascii is the expected character set */
-  /* not fixed, can be changed through command line parameter */
-  , NULL_POS_OPS
+  NULL_POS_OPS
 };
 /**************************************************************************/
diff --git a/shape.h b/shape.h
index 4832d7d70646889092cd9c5b410cd2af7d5ea21c..3d1c0b9f1b38451a5764da28b57e513bdb7e663b 100644 (file)
--- a/shape.h
+++ b/shape.h
@@ -25,7 +25,7 @@
 #include <QString>              // for QString
 #include <QVector>              // for QVector
 
-#include "defs.h"               // for arglist_t, ARGTYPE_STRING, Waypoint, route_head, CET_CHARSET_ASCII, FF_CAP_RW_ALL, ff_cap, ff_type, ff_type_file
+#include "defs.h"               // for arglist_t, ARGTYPE_STRING, Waypoint, route_head, FF_CAP_RW_ALL, ff_cap, ff_type, ff_type_file
 #include "format.h"             // for Format
 #if SHAPELIB_ENABLED
 #if HAVE_LIBSHAPE
@@ -53,16 +53,6 @@ public:
     return FF_CAP_RW_ALL;
   }
 
-  QString get_encode() const override
-  {
-    return CET_CHARSET_ASCII;
-  }
-
-  int get_fixed_encode() const override
-  {
-    return 0;
-  }
-
   void rd_init(const QString& fname) override;
   void read() override;
   void rd_deinit() override;
index e8ae07a7b95c53c92a6d76a01acdb350f40e5175..d7d6fe76b33651f0af33f170baf76c24f9ce4c57 100644 (file)
--- a/skytraq.h
+++ b/skytraq.h
@@ -31,7 +31,7 @@
 #include <cstdint>   // for uint8_t, int32_t, uint32_t, uint16_t, int16_t
 #include <ctime>     // for time_t
 
-#include "defs.h"    // for arglist_t, ARGTYPE_INT, ff_cap, ARG_NOMINMAX, ARGTYPE_STRING, ff_cap_read, ARGTYPE_BOOL, CET_CHARSET_UTF8, ff_cap_none, ff_type, ARGTYPE_OUTFILE, ff_type_serial, Waypoint, ff_type_file, route_head
+#include "defs.h"    // for arglist_t, ARGTYPE_INT, ff_cap, ARG_NOMINMAX, ARGTYPE_STRING, ff_cap_read, ARGTYPE_BOOL, ff_cap_none, ff_type, ARGTYPE_OUTFILE, ff_type_serial, Waypoint, ff_type_file, route_head
 #include "format.h"  // for Format
 #include "gbfile.h"  // for gbfile
 
@@ -182,16 +182,6 @@ public:
     return { ff_cap_read, ff_cap_read, ff_cap_none };
   }
 
-  QString get_encode() const override
-  {
-    return CET_CHARSET_UTF8;
-  }
-
-  int get_fixed_encode() const override
-  {
-    return 1;
-  }
-
   void rd_init(const QString& fname) override {skytraq_rd_init(fname);}
   void read() override {skytraq_read();}
   void rd_deinit() override {skytraq_rd_deinit();}
@@ -270,16 +260,6 @@ public:
     return { ff_cap_read, ff_cap_read, ff_cap_none };
   }
 
-  QString get_encode() const override
-  {
-    return CET_CHARSET_UTF8;
-  }
-
-  int get_fixed_encode() const override
-  {
-    return 1;
-  }
-
   void rd_init(const QString& fname) override;
   void read() override;
   void rd_deinit() override;
@@ -336,16 +316,6 @@ public:
     return { ff_cap_read, ff_cap_read, ff_cap_none };
   }
 
-  QString get_encode() const override
-  {
-    return CET_CHARSET_UTF8;
-  }
-
-  int get_fixed_encode() const override
-  {
-    return 1;
-  }
-
   void rd_init(const QString& fname) override;
   void read() override;
   void rd_deinit() override;
index e54ebee99daf5aed78676291af39cde905f26333..5a43ae37467ba96a7b7f15bec0d63fb6f195793b 100644 (file)
--- a/subrip.h
+++ b/subrip.h
@@ -50,16 +50,6 @@ public:
     return { ff_cap_none, ff_cap_write, ff_cap_none }; // waypoints, track, route; for now, we just do tracks
   }
 
-  QString get_encode() const override
-  {
-    return CET_CHARSET_ASCII;
-  }
-
-  int get_fixed_encode() const override
-  {
-    return 0;
-  }
-
   void wr_init(const QString& fname) override;
   void write() override;
   void wr_deinit() override;
diff --git a/text.h b/text.h
index e280ec676c2a30f019d6779b6d761ea13a511064..3305a92b00a9c5e515651cda2dde8e2ffc5e48c2 100644 (file)
--- a/text.h
+++ b/text.h
@@ -48,16 +48,6 @@ public:
     return { ff_cap_write, ff_cap_none, ff_cap_none};
   }
 
-  QString get_encode() const override
-  {
-    return CET_CHARSET_ASCII;
-  }
-
-  int get_fixed_encode() const override
-  {
-    return 0;
-  }
-
   void wr_init(const QString& fname) override;
   void write() override;
   void wr_deinit() override;
diff --git a/tpg.cc b/tpg.cc
index 66ed4792be3edd16fda5a1a354bcfba28a9f08b8..4e1e337babcb19d5f2d43286ca67b13ff5c448bb 100644 (file)
--- a/tpg.cc
+++ b/tpg.cc
@@ -320,6 +320,5 @@ ff_vecs_t tpg_vecs = {
   tpg_write,
   nullptr,
   &tpg_args,
-  CET_CHARSET_ASCII, 0 /* CET-REVIEW */
-  , NULL_POS_OPS
+  NULL_POS_OPS
 };
diff --git a/tpo.cc b/tpo.cc
index f37fdd44aa791a71600eff14cdc3c63ef64a5b38..ee511c6cc24b4b3e1be46e9c818ff1dec55ecf5d 100644 (file)
--- a/tpo.cc
+++ b/tpo.cc
@@ -2114,8 +2114,7 @@ ff_vecs_t tpo2_vecs = {
 #endif
   nullptr,
   &tpo2_args,
-  CET_CHARSET_ASCII, 0 /* CET-REVIEW */
-  , NULL_POS_OPS
+  NULL_POS_OPS
 };
 
 /* TPO 3.x format can read waypoints/tracks/routes */
@@ -2130,6 +2129,5 @@ ff_vecs_t tpo3_vecs = {
   nullptr,
   nullptr,
   &tpo3_args,
-  CET_CHARSET_ASCII, 0 /* CET-REVIEW */
-  , NULL_POS_OPS
+  NULL_POS_OPS
 };
index 08dfa44660f47b199c342763763a5b5490522f49..f2922ff19920493a8092ceecadb878cfac4e93a6 100644 (file)
--- a/unicsv.h
+++ b/unicsv.h
@@ -52,16 +52,6 @@ public:
     return FF_CAP_RW_ALL;
   }
 
-  QString get_encode() const override
-  {
-    return CET_CHARSET_UTF8;
-  }
-
-  int get_fixed_encode() const override
-  {
-    return 0;
-  }
-
   void rd_init(const QString& fname) override;
   void read() override;
   void rd_deinit() override;
diff --git a/v900.cc b/v900.cc
index f008cbef5a4984b8b130d878eb7c2ec1d0b0eba1..d244a304556f84f3eacc88bc6015f839db8a29e0 100644 (file)
--- a/v900.cc
+++ b/v900.cc
@@ -364,6 +364,8 @@ v900_read()
   }
 }
 
+/* Could be  US-ASCII, since we only read "0-9,A-Z\n\r" */
+
 ff_vecs_t v900_vecs = {
   ff_type_file,
   {ff_cap_read, ff_cap_read, ff_cap_none}, /* Read only format. May only read trackpoints and waypoints. */
@@ -375,6 +377,5 @@ ff_vecs_t v900_vecs = {
   nullptr,          /* write */
   nullptr,
   nullptr,          /* args */
-  CET_CHARSET_UTF8, 1, /* Could be  US-ASCII, since we only read "0-9,A-Z\n\r" */
   {nullptr,nullptr,nullptr,nullptr,nullptr,nullptr}
 };
diff --git a/vcf.cc b/vcf.cc
index fcc616eb0dce0acbacc60d57404f4b2896a7dd5c..ee48acbdf92f08a15c8ecae2638bc0c511031a8d 100644 (file)
--- a/vcf.cc
+++ b/vcf.cc
@@ -148,6 +148,5 @@ ff_vecs_t vcf_vecs = {
   data_write,
   nullptr,
   &vcf_args,
-  CET_CHARSET_ASCII, 0 /* CET-REVIEW */
-  , NULL_POS_OPS
+  NULL_POS_OPS
 };
index 1324786be30a14140529d82dc6a60a89a9fcd04f..eeb6c435bdbe68b7fa2ed82ddad52b088fe15ce7 100644 (file)
@@ -1073,6 +1073,8 @@ static QVector<arglist_t> wbt_sargs = {
   },
 };
 
+/* master process: don't convert anything */
+
 ff_vecs_t wbt_svecs = {
   ff_type_serial,
   { ff_cap_read, ff_cap_read, ff_cap_none },
@@ -1084,8 +1086,7 @@ ff_vecs_t wbt_svecs = {
   nullptr,
   nullptr,
   &wbt_sargs,
-  CET_CHARSET_UTF8, 1         /* master process: don't convert anything | CET-REVIEW */
-  , NULL_POS_OPS
+  NULL_POS_OPS
 };
 
 /* used for wbt-bin /and/ wbt-tk1 */
@@ -1093,6 +1094,8 @@ ff_vecs_t wbt_svecs = {
 static QVector<arglist_t> wbt_fargs = {
 };
 
+/* master process: don't convert anything */
+
 ff_vecs_t wbt_fvecs = {
   ff_type_file,
   { ff_cap_none, ff_cap_read, ff_cap_none },
@@ -1104,6 +1107,5 @@ ff_vecs_t wbt_fvecs = {
   nullptr,
   nullptr,
   &wbt_fargs,
-  CET_CHARSET_UTF8, 1         /* master process: don't convert anything | CET-REVIEW */
-  , NULL_POS_OPS
+  NULL_POS_OPS
 };
diff --git a/xcsv.h b/xcsv.h
index e4bc620b722333ff0095964f2d2d25509dbe06cc..c3f55eaf6f2d09ec0161041cdbce5c5e6a49eab0 100644 (file)
--- a/xcsv.h
+++ b/xcsv.h
@@ -278,16 +278,6 @@ public:
     return FF_CAP_RW_WPT; /* This is a bit of a lie for now... */
   }
 
-  QString get_encode() const override
-  {
-    return CET_CHARSET_UTF8;
-  }
-
-  int get_fixed_encode() const override
-  {
-    return 0;
-  }
-
   void rd_init(const QString& fname) override;
   void read() override;
   void rd_deinit() override;